3.6.18 \(\int \cos ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)} (A+B \sec (c+d x)) \, dx\) [518]

Optimal. Leaf size=82 \[ \frac {2 a (A+3 B) \sin (c+d x)}{3 d \sqrt {\cos (c+d x)} \sqrt {a+a \sec (c+d x)}}+\frac {2 A \sqrt {\cos (c+d x)} \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{3 d} \]

[Out]

2/3*a*(A+3*B)*sin(d*x+c)/d/cos(d*x+c)^(1/2)/(a+a*sec(d*x+c))^(1/2)+2/3*A*sin(d*x+c)*cos(d*x+c)^(1/2)*(a+a*sec(
d*x+c))^(1/2)/d

________________________________________________________________________________________

Rubi [A]
time = 0.17, antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.086, Rules used = {3034, 4098, 3889} \begin {gather*} \frac {2 a (A+3 B) \sin (c+d x)}{3 d \sqrt {\cos (c+d x)} \sqrt {a \sec (c+d x)+a}}+\frac {2 A \sin (c+d x) \sqrt {\cos (c+d x)} \sqrt {a \sec (c+d x)+a}}{3 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^(3/2)*Sqrt[a + a*Sec[c + d*x]]*(A + B*Sec[c + d*x]),x]

[Out]

(2*a*(A + 3*B)*Sin[c + d*x])/(3*d*Sqrt[Cos[c + d*x]]*Sqrt[a + a*Sec[c + d*x]]) + (2*A*Sqrt[Cos[c + d*x]]*Sqrt[
a + a*Sec[c + d*x]]*Sin[c + d*x])/(3*d)

Rule 3034

Int[((a_.) + csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_.)*((g_.)*sin[(e_.
) + (f_.)*(x_)])^(p_.), x_Symbol] :> Dist[(g*Csc[e + f*x])^p*(g*Sin[e + f*x])^p, Int[(a + b*Csc[e + f*x])^m*((
c + d*Csc[e + f*x])^n/(g*Csc[e + f*x])^p), x], x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p}, x] && NeQ[b*c - a*d
, 0] &&  !IntegerQ[p] &&  !(IntegerQ[m] && IntegerQ[n])

Rule 3889

Int[Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)]/Sqrt[csc[(e_.) + (f_.)*(x_)]*(d_.)], x_Symbol] :> Simp[-2*a*(Co
t[e + f*x]/(f*Sqrt[a + b*Csc[e + f*x]]*Sqrt[d*Csc[e + f*x]])), x] /; FreeQ[{a, b, d, e, f}, x] && EqQ[a^2 - b^
2, 0]

Rule 4098

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*
(B_.) + (A_)), x_Symbol] :> Simp[A*Cot[e + f*x]*(a + b*Csc[e + f*x])^m*((d*Csc[e + f*x])^n/(f*n)), x] - Dist[(
a*A*m - b*B*n)/(b*d*n), Int[(a + b*Csc[e + f*x])^m*(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, A
, B, m, n}, x] && NeQ[A*b - a*B, 0] && EqQ[a^2 - b^2, 0] && EqQ[m + n + 1, 0] &&  !LeQ[m, -1]

Rubi steps

\begin {align*} \int \cos ^{\frac {3}{2}}(c+d x) \sqrt {a+a \sec (c+d x)} (A+B \sec (c+d x)) \, dx &=\left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\sqrt {a+a \sec (c+d x)} (A+B \sec (c+d x))}{\sec ^{\frac {3}{2}}(c+d x)} \, dx\\ &=\frac {2 A \sqrt {\cos (c+d x)} \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{3 d}+\frac {1}{3} \left ((A+3 B) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\sqrt {a+a \sec (c+d x)}}{\sqrt {\sec (c+d x)}} \, dx\\ &=\frac {2 a (A+3 B) \sin (c+d x)}{3 d \sqrt {\cos (c+d x)} \sqrt {a+a \sec (c+d x)}}+\frac {2 A \sqrt {\cos (c+d x)} \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{3 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.20, size = 56, normalized size = 0.68 \begin {gather*} \frac {2 \sqrt {\cos (c+d x)} (2 A+3 B+A \cos (c+d x)) \sqrt {a (1+\sec (c+d x))} \tan \left (\frac {1}{2} (c+d x)\right )}{3 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^(3/2)*Sqrt[a + a*Sec[c + d*x]]*(A + B*Sec[c + d*x]),x]

[Out]

(2*Sqrt[Cos[c + d*x]]*(2*A + 3*B + A*Cos[c + d*x])*Sqrt[a*(1 + Sec[c + d*x])]*Tan[(c + d*x)/2])/(3*d)

________________________________________________________________________________________

Maple [A]
time = 11.90, size = 65, normalized size = 0.79

method result size
default \(-\frac {2 \left (-1+\cos \left (d x +c \right )\right ) \left (A \cos \left (d x +c \right )+2 A +3 B \right ) \left (\sqrt {\cos }\left (d x +c \right )\right ) \sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}}{3 d \sin \left (d x +c \right )}\) \(65\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^(3/2)*(A+B*sec(d*x+c))*(a+a*sec(d*x+c))^(1/2),x,method=_RETURNVERBOSE)

[Out]

-2/3/d*(-1+cos(d*x+c))*(A*cos(d*x+c)+2*A+3*B)*cos(d*x+c)^(1/2)*(a*(1+cos(d*x+c))/cos(d*x+c))^(1/2)/sin(d*x+c)

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 141 vs. \(2 (70) = 140\).
time = 0.85, size = 141, normalized size = 1.72 \begin {gather*} \frac {\sqrt {2} {\left (3 \, \cos \left (\frac {2}{3} \, \arctan \left (\sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ), \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right )\right )\right ) \sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ) - 3 \, \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ) \sin \left (\frac {2}{3} \, \arctan \left (\sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ), \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right )\right )\right ) + 2 \, \sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ) + 3 \, \sin \left (\frac {1}{3} \, \arctan \left (\sin \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right ), \cos \left (\frac {3}{2} \, d x + \frac {3}{2} \, c\right )\right )\right )\right )} A \sqrt {a} + 12 \, \sqrt {2} B \sqrt {a} \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (d x + c\right ), \cos \left (d x + c\right )\right )\right )}{6 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^(3/2)*(A+B*sec(d*x+c))*(a+a*sec(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

1/6*(sqrt(2)*(3*cos(2/3*arctan2(sin(3/2*d*x + 3/2*c), cos(3/2*d*x + 3/2*c)))*sin(3/2*d*x + 3/2*c) - 3*cos(3/2*
d*x + 3/2*c)*sin(2/3*arctan2(sin(3/2*d*x + 3/2*c), cos(3/2*d*x + 3/2*c))) + 2*sin(3/2*d*x + 3/2*c) + 3*sin(1/3
*arctan2(sin(3/2*d*x + 3/2*c), cos(3/2*d*x + 3/2*c))))*A*sqrt(a) + 12*sqrt(2)*B*sqrt(a)*sin(1/2*arctan2(sin(d*
x + c), cos(d*x + c))))/d

________________________________________________________________________________________

Fricas [A]
time = 2.18, size = 64, normalized size = 0.78 \begin {gather*} \frac {2 \, {\left (A \cos \left (d x + c\right ) + 2 \, A + 3 \, B\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{3 \, {\left (d \cos \left (d x + c\right ) + d\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^(3/2)*(A+B*sec(d*x+c))*(a+a*sec(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

2/3*(A*cos(d*x + c) + 2*A + 3*B)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*sqrt(cos(d*x + c))*sin(d*x + c)/(d*co
s(d*x + c) + d)

________________________________________________________________________________________

Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**(3/2)*(A+B*sec(d*x+c))*(a+a*sec(d*x+c))**(1/2),x)

[Out]

Exception raised: SystemError >> excessive stack use: stack is 6437 deep

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^(3/2)*(A+B*sec(d*x+c))*(a+a*sec(d*x+c))^(1/2),x, algorithm="giac")

[Out]

integrate((B*sec(d*x + c) + A)*sqrt(a*sec(d*x + c) + a)*cos(d*x + c)^(3/2), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\cos \left (c+d\,x\right )}^{3/2}\,\left (A+\frac {B}{\cos \left (c+d\,x\right )}\right )\,\sqrt {a+\frac {a}{\cos \left (c+d\,x\right )}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)^(3/2)*(A + B/cos(c + d*x))*(a + a/cos(c + d*x))^(1/2),x)

[Out]

int(cos(c + d*x)^(3/2)*(A + B/cos(c + d*x))*(a + a/cos(c + d*x))^(1/2), x)

________________________________________________________________________________________